// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'


Shader "Hidden/BlurPassesForDOF"
{
Properties
{
	_MainTex("Texture", 2D) = "white" {}
 _TapMedium("TapMedium (RGB)", 2D) = "" {}
_TapLow("TapLow (RGB)", 2D) = "" {}
}
	
	

	SubShader
     {
  ZTest Always
  ZWrite Off
  Cull Off
  Fog { Mode Off }

    LOD 100
	Pass
	{
	
	

	CGPROGRAM
	#pragma vertex vert
	#pragma fragment frag
	#include "UnityCG.cginc"
    //#define Fixed3(value)  fixed3(value, value,value)

	struct VertexInput {
    fixed4 vertex : POSITION;
	fixed4 xlv_TEXCOORD0 : TEXCOORD0;
    //fixed2 xlv_TEXCOORD1 : TEXCOORD1;
    //fixed3 xlv_TEXCOORD2 : TEXCOORD2;
    //fixed3 xlv_TEXCOORD3 : TEXCOORD3;
    //fixed4 tangent : TANGENT;
    fixed3 normal : NORMAL;
    //fixed4 xlv_COLOR : COLOR;
	//VertexInput
	};


	struct VertexOutput {
	fixed4 pos : SV_POSITION;
    UNITY_FOG_COORDS(1)
    //fixed4 xlv_COLOR : COLOR;
	fixed2 xlv_TEXCOORD0 : TEXCOORD0;
    fixed4 xlv_TEXCOORD1 : TEXCOORD1;
    fixed4 xlv_TEXCOORD2 : TEXCOORD2;
    fixed4 xlv_TEXCOORD3 : TEXCOORD3;
    //fixed3 xlv_TEXCOORD4 : TEXCOORD4;
	//VertexOutput
	};
 
 float4 offsets;


 sampler2D _MainTex;




	VertexOutput vert (VertexInput v)
	{
	VertexOutput o;
	//o.pos = UnityObjectToClipPos (v.vertex);
	//o.xlv_TEXCOORD0 = TRANSFORM_TEX(v.xlv_TEXCOORD0, _MainTex);
	
  float2 tmpvar_1;
  half2 tmpvar_2;
  tmpvar_2 = v.xlv_TEXCOORD0;
  tmpvar_1 = tmpvar_2;
  o.pos = UnityObjectToClipPos( v.vertex);
  o.xlv_TEXCOORD0 = tmpvar_1;
  float4 cse_3;
  cse_3 = (offsets.xyxy * fixed4(1.0, 1.0, -1.0, -1.0));
  o.xlv_TEXCOORD1 = (v.xlv_TEXCOORD0.xyxy + cse_3);
  o.xlv_TEXCOORD2 = (v.xlv_TEXCOORD0.xyxy + (cse_3 * 2.0));
  o.xlv_TEXCOORD3 = (v.xlv_TEXCOORD0.xyxy + (cse_3 * 3.0));


    UNITY_TRANSFER_FOG(o,o.vertex);
   
	return o;
	}


	fixed4 frag(VertexOutput i) : SV_Target
    {
    //fixed4 tmpvar_2 = tex2D(_MainTex, i.uv);
	
  float4 tmpvar_1;
  half4 sampleE_2;
  half4 sampleD_3;
  half4 sampleC_4;
  half4 sampleB_5;
  half4 sampleA_6;
  fixed4 tmpvar_7;
  tmpvar_7 = tex2D (_MainTex, i.xlv_TEXCOORD0);
  sampleA_6 = tmpvar_7;
  fixed4 tmpvar_8;
  tmpvar_8 = tex2D (_MainTex, i.xlv_TEXCOORD1.xy);
  sampleB_5 = tmpvar_8;
  fixed4 tmpvar_9;
  tmpvar_9 = tex2D (_MainTex, i.xlv_TEXCOORD1.zw);
  sampleC_4 = tmpvar_9;
  fixed4 tmpvar_10;
  tmpvar_10 = tex2D (_MainTex, i.xlv_TEXCOORD2.xy);
  sampleD_3 = tmpvar_10;
  fixed4 tmpvar_11;
  tmpvar_11 = tex2D (_MainTex, i.xlv_TEXCOORD2.zw);
  sampleE_2 = tmpvar_11;
  half4 tmpvar_12;
  tmpvar_12 = (((
    ((sampleA_6 + (sampleB_5 * 1.25)) + (sampleC_4 * 1.25))
   + 
    (sampleD_3 * 1.75)
  ) + (sampleE_2 * 1.75)) / 7.0);
  tmpvar_1 = tmpvar_12;
	UNITY_APPLY_FOG(i.fogCoord, tmpvar_1);
  return tmpvar_1;

	}
	ENDCG
	}
  }
Fallback "Diffuse"
}

